home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_217 / stevie / term.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  5KB  |  120 lines

  1. /*
  2.  * STEVIE - Simply Try this Editor for VI Enthusiasts
  3.  *
  4.  * Code Contributions By : Tim Thompson           twitch!tjt
  5.  *                         Tony Andrews           onecom!wldrdg!tony 
  6.  *                         G. R. (Fred) Walter    watmath!watcgl!grwalter 
  7.  */
  8.  
  9. /*
  10.  * This file contains the machine dependent escape sequences that the editor
  11.  * needs to perform various operations. Some of the sequences here are
  12.  * optional. Anything not available should be indicated by a null string.
  13.  *
  14.  * Insert/delete line sequences are necessary.
  15.  */
  16.  
  17. /*
  18.  * The macro names here correspond (more or less) to the actual ANSI names 
  19.  */
  20.  
  21. #ifdef    ATARI
  22. #define    T_ED    "\033E"        /* erase display (may optionally home cursor) */
  23. #define    T_EL    "\033l"        /* erase the entire current line */
  24. #define    T_IL    "\033L"        /* insert one line */
  25. #define    T_DL    "\033M"        /* delete one line */
  26. #define    T_CI    "\033f"        /* invisible cursor (very optional) */
  27. #define    T_CV    "\033e"        /* visible cursor (very optional) */
  28. #define T_TP    ""        /* plain text */
  29. #define T_TI    ""        /* inverse-video text */
  30. #endif
  31.  
  32. #ifdef    UNIX
  33. /* The UNIX sequences are hard-wired for ansi-like terminals. */
  34. #define    T_ED    "\033[2J"    /* erase display (may optionally home cursor) */
  35. #define    T_END_D    "\033[J"    /* erase to end of display */
  36. #define    T_EL    "\033[2K"    /* erase the entire current line */
  37. #define    T_END_L    "\033[K"    /* erase to the end of the current line */
  38. #define    T_IL    "\033[L"    /* insert one line */
  39. #define    T_DL    "\033[M"    /* delete one line */
  40. #define    T_CI    ""        /* invisible cursor (very optional) */
  41. #define    T_CV    ""        /* visible cursor (very optional) */
  42. #define T_TP    ""        /* plain text */
  43. #define T_TI    ""        /* inverse-video text */
  44. #endif
  45.  
  46. #ifdef    BSD
  47. /* The BSD 4.3 sequences are hard-wired for ansi-like terminals. */
  48. #define    T_ED    "\033[2J"    /* erase display (may optionally home cursor) */
  49. #define    T_END_D    "\033[J"    /* erase to end of display */
  50. #define    T_EL    "\033[2K"    /* erase the entire current line */
  51. #define    T_END_L    "\033[K"    /* erase to the end of the current line */
  52. #define    T_IL    "\033[L"    /* insert line */
  53. #define    T_DL    "\033[M"    /* delete line */
  54. #define    T_CI    ""        /* invisible cursor */
  55. #define    T_CV    ""        /* visible cursor */
  56. #define T_TP    "\033[m"    /* plain text */
  57. #define T_TI    "\033[7m"    /* inverse-video text */
  58. #endif
  59.  
  60. #ifdef    OS2
  61. /*
  62.  * The OS/2 ansi console driver is pretty deficient. No insert or delete line
  63.  * sequences. The erase line sequence only erases from the cursor to the end
  64.  * of the line. For our purposes that works out okay, since the only time
  65.  * T_EL is used is when the cursor is in column 0.
  66.  *
  67.  * The insert/delete line sequences marked here are actually implemented in
  68.  * the file os2.c using direct OS/2 system calls. This makes the capability
  69.  * available for the rest of the editor via appropriate escape sequences
  70.  * passed to outstr().
  71.  */
  72. #define    T_ED    "\033[2J"    /* erase display (may optionally home cursor) */
  73. #define    T_EL    "\033[K"    /* erase the entire current line */
  74. #define    T_END_L    "\033[K"    /* erase to the end of the current line */
  75. #define    T_IL    "\033[L"    /* insert one line - fake (see os2.c) */
  76. #define    T_DL    "\033[M"    /* delete one line - fake (see os2.c) */
  77. #define    T_CI    ""        /* invisible cursor (very optional) */
  78. #define    T_CV    ""        /* visible cursor (very optional) */
  79. #define T_TP    ""        /* plain text */
  80. #define T_TI    ""        /* inverse-video text */
  81. #endif
  82.  
  83. #ifdef AMIGA
  84. /*
  85.  * The erase line sequence only erases from the cursor to the end of the
  86.  * line. For our purposes that works out okay, since the only time T_EL is
  87.  * used is when the cursor is in column 0. 
  88.  */
  89. #define    T_ED    "\014"        /* erase display (may optionally home cursor) */
  90. #define    T_END_D    "\033[J"    /* erase to end of display */
  91. #define    T_EL    "\033[K"    /* erase the entire current line */
  92. #define    T_END_L    "\033[K"    /* erase to the end of the current line */
  93. #define    T_IL    "\033["        /* insert line */
  94. #define    T_IL_B    "L"
  95. #define    T_DL    "\033["        /* delete line */
  96. #define    T_DL_B    "M"
  97. #define    T_CI    "\033[0 p"    /* invisible cursor (very optional) */
  98. #define    T_CV    "\033[1 p"    /* visible cursor (very optional) */
  99. #define T_TP    "\033[0m"    /* plain text */
  100. #define T_TI    "\033[7m"    /* inverse-video text */
  101. #endif
  102.  
  103. #ifdef    DOS
  104. /*
  105.  * DOS sequences
  106.  *
  107.  * Some of the following sequences require the use of the "nansi.sys"
  108.  * console driver. The standard "ansi.sys" driver doesn't support
  109.  * sequences for insert/delete line.
  110.  */
  111. #define    T_ED    "\033[2J"    /* erase display (may optionally home cursor) */
  112. #define    T_EL    "\033[K"    /* erase the entire current line */
  113. #define    T_IL    "\033[L"    /* insert line (requires nansi.sys driver) */
  114. #define    T_DL    "\033[M"    /* delete line (requires nansi.sys driver) */
  115. #define    T_CI    ""        /* invisible cursor (very optional) */
  116. #define    T_CV    ""        /* visible cursor (very optional) */
  117. #define T_TP    ""        /* plain text */
  118. #define T_TI    ""        /* inverse-video text */
  119. #endif
  120.